package org.spring.blog.controller;

import org.spring.blog.response.ResponseResult;
import org.spring.blog.response.ResponseState;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ErrorPageController {

    @RequestMapping("/403")
    public ResponseResult page403() {

        return ResponseResult.failed(ResponseState.error_403_message, ResponseState.error_403_code);
    }

    @RequestMapping("/404")
    public ResponseResult page404() {

        return ResponseResult.failed(ResponseState.error_404_message, ResponseState.error_404_code);
    }

    @RequestMapping("/504")
    public ResponseResult page504() {

        return ResponseResult.failed(ResponseState.error_504_message, ResponseState.error_504_code);
    }

    @RequestMapping("/505")
    public ResponseResult page505() {

        return ResponseResult.failed(ResponseState.error_505_message, ResponseState.error_505_code);
    }
}
